home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource for Source: C/C++
/
Resource for Source - C-C++.iso
/
codelib2
/
v_02_03
/
2n03023b
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1995-11-01
|
279 b
|
18 lines
/*
* Compare two int arrays, a and b. Return 1 if, for
* all i from 0 to n-1, a[i] == b[i]; otherwise return
* 0.
*/
int equal(const int a[], const int b[], size_t n)
{
size_t i;
for (i = 0; i < n; ++i)
if (a[i] != b[i])
return 0;
return 1;
}